path degree cycle in path